package com.ak.server.platform.mapper;

import com.ak.common.entity.system.TenantApplication;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 租户关联系统表
 */
public interface TenantApplicationMapper extends BaseMapper<TenantApplication> {

    /**
     * 根据租户编码删除子系统关联
     *
     * @param tenantCode
     * @param appCode
     * @return
     */
    Boolean deleteByTenantCodeOrAppCode(@Param("tenantCode") String tenantCode, @Param("appCode") String appCode);

    /**
     * 添加租户关联子系统
     *
     * @param tenantCode
     * @param appCodes
     * @return
     */
    int batchTenantApplication(@Param("tenantCode") String tenantCode, @Param("appCodes") List<String> appCodes);

}
